﻿@model P2PWeb.Models.Campaign
@{
    ViewBag.Title = "Index";
    Html.EnableUnobtrusiveJavaScript(true);
}
@using P2PWeb;
@using P2PWeb.Common;

<link href="@Url.Content("~/Content/lend.css")" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="@Url.Content("~/Scripts/jquery-ui-1.10.4.min.js")"></script>
<script type="text/javascript" src="@Url.Content("~/Scripts/jquery.validate.js")"></script>
<script type="text/javascript" src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.js")"></script>
<script type="text/javascript" src="@Url.Content("~/Scripts/app/InterestRate.js")"></script>
<script type="text/javascript" src="@Url.Content("~/Scripts/app/Lend.js")"></script>

<div class="main ">
    <div class="main_top"><span class="main_top_right"></span></div>
    <div class="main_box pt0 pb0 pr30 pl30 clearfix">
        <h2 class="content_title ml_neg_22 png">我要出借</h2>
        <div class="dib ml45 mt37 png"></div>
        @using (Html.BeginForm("CreateLend", "Lend"))
        {
            @Html.AntiForgeryToken();
            @Html.HiddenFor(m => m.Flight.First(f=>f.ID==-1).CampaignID);
            @Html.HiddenFor(m => m.InterestRate);
        <table class="main_box_table w808 bc mt28" cellpadding="0" cellspacing="0">
            <thead>
                <tr>
                    <th colspan="2"><span class="mbt_theadLine"></span><span class="mbt_theadL mr52"></span>投标信息</th>
                    <th class="pl50"><span class="mbt_theadLine"></span>年利率</th>
                    <th class="pl20"><span class="mbt_theadLine"></span>投标金额（元）</th>
                    <th class="pl20"><span class="mbt_theadR"></span><span class="mr5"></span></th>
                </tr>
            </thead>
            <tbody>
                <tr class="borderLR0">
                    <td class="mbt_tbody_white" colspan="6"></td>
                </tr>
                <tr>
                    <th class="pl55 mbt_tbodyLie6" colspan="2">
                        @Html.LabelFor(m=>m.Name,Model.Name,new {@class="ell dib w258"})
                        @*<span class="ell dib w258" title="日常消费(女,27岁,福建省厦门市)">日常消费(女,27岁,福建省厦门市)</span>*@
                    </th>
                    <th class="tc fn">
                        @Html.LabelFor(m => m.InterestRate,Model.InterestRate.CustomFormatP(), new {@class="fb"})
                    </th>
                    <th class="tc fn">
                        @Html.TextBoxFor(m=>m.Flight.First(f=>f.ID==-1).Amount,new{@class="mbt_text"})
                        @Html.ValidationMessageFor(m=>m.Flight.First(f=>f.ID==-1).Amount)
                    </th>
                    <th class="tc fn">
                        <i class="bao"></i>

                    </th>
                    <th class="mbt_tbodyRie6 tc"></th>
                </tr>
                <tr>
                    <td class="pl55 mbt_tbodyLie6">借款人：
                        @Html.LabelFor(m=>m.Account.AccountInfo.RealName,Model.Account.AccountInfo.RealName,new {@class="liIcon_ell56"})
                        @*<span class="liIcon_ell56">手机用户08481839</span>*@

                    </td>
                    <td>借款金额：
                          @Html.LabelFor(m=>m.Amount,Model.Amount.CustomFormatN(),new {@class="liIcon_ell52"})
                        @*<span class="liIcon_ell52">50,000</span>*@
                        元</td>
                    <td>已投标金额：
                          @Html.LabelFor(m=>m.RealAmount,Model.RealAmount.CustomFormatN(),new {@class="liIcon_ell52_ie6"})
                        @*<span id="usedamt151840" class="liIcon_ell52_ie6">50,000</span>*@
                        元</td>
                    <td class="tc">借款期限：
                         @Html.HiddenFor(m=>m.LoanPeriod)
                        @Html.LabelFor(m=>m.LoanPeriod,Model.LoanPeriod+"")
                        @*<span>36</span>*@
                        个月</td>
                    <td>状态：
                        @Html.LabelFor(m =>m.Status,((CampaignState)Model.Status).GetDisplayName(), new {@class="fb" })
                    </td>
                    <td class="mbt_tbodyRie6"></td>
                </tr>
                <tr class="borderLR0">
                    <td class="mbt_tbody_white" colspan="6"></td>
                </tr>
                <tr class="borderLR0">
                    <td class="mbt_tbody_white" colspan="6"></td>
                </tr>
            </tbody>
        </table>
        <hr class="main_box_dotline w808 bc mt15 mb15">
        <div class="main_box_footer w808 bc clearfix">
            <span class="mbf_R"></span>
            <span class="mbf_L"></span>
            <span class="f14 fb">
                <span class="col666">您的当前余额：</span>
                <span  class="colred4">@Html.Label(ViewData["CurUserMoney"]+"")</span>
            </span>
            <span class="fr f14 fb">
                <span class="col666">总计支出：</span>
                <span id="cartTotalAmt" class="colred4">正在计算...</span>
                <span class="col666 mr20">元</span>
                <span class="col666">预计总收益：</span>
                <span class="colred4" id="expertAmount">正在计算...</span>
                <span class="col666 mr20">元</span>
            </span>
        </div>
        <div class="fr mt37 h34 lh34 mr70_ie6 mb50">
            <a title="" class="main_box_btn4 fontClear fl dialogOpen" id="bid_conformation_btn">投标确认</a>
        </div>
        }


    </div>
    <div class="main_bottom"><span class="main_bottom_right"></span></div>
</div>
